// BbsStateCollection.h: interface for the CBbsStateCollection class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BBSSTATECOLLECTION_H__463A47CA_C84B_4EEE_821B_0080C7CB2F86__INCLUDED_)
#define AFX_BBSSTATECOLLECTION_H__463A47CA_C84B_4EEE_821B_0080C7CB2F86__INCLUDED_

#include "TelnetLayer.h"
#include "AnsiScreen.h"
#include "IVirtualKeyboard.h"
#include "IBbsState.h"
#include "PressEnterBbsState.h"
#include "PressAnykeyBbsState.h"
#include "MainMenuBbsState.h"
#include "BoardListBbsState.h"
#include "PostListBbsState.h"
#include "AnnounceListBbsState.h"
#include "ReadPostBbsState.h"
#include "MailListBbsState.h"
#include "ReadMailBbsState.h"
#include "UnknownBbsState.h"
#include "DisconnectedBbsState.h"
#include "NormalMenuBbsState.h"
#include "NullBbsState.h"

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CBbsStateCollection  
{
protected:
	CTelnetLayer *m_pTelnetLayer;
	CAnsiScreen *m_pScreen;

	CPressEnterBbsState m_pressEnterBbsState;
	CPressAnykeyBbsState m_pressAnyKeyBbsState;
	CMainMenuBbsState m_mainMenuBbsState;
	CBoardListBbsState m_boardListBbsState;
	CPostListBbsState m_postListBbsState;
	CAnnounceListBbsState m_announceListBbsState;
	CReadPostBbsState m_readPostBbsState;
	CMailListBbsState m_mailListBbsState;
	CReadMailBbsState m_readMailBbsState;
	CNormalMenuBbsState m_normalMenuBbsState;
	CUnknownBbsState m_unknownBbsState;
	CDisconnectedBbsState m_disconnectedBbsState;
	CNullBbsState m_nullBbsState;

	CArray<IBbsState*, IBbsState*> m_states;
	IBbsState* m_activeState;

public:
	IBbsState* GetActiveState();
	void UpdateActiveState(CPoint ptCursorCell);
	void SetNullBbsState();

public:	
	CBbsStateCollection(CTelnetLayer *pTelnetLayer, CAnsiScreen *pScreen, IVirtualKeyboard *pKeyboard);
	virtual ~CBbsStateCollection();

};

#endif // !defined(AFX_BBSSTATECOLLECTION_H__463A47CA_C84B_4EEE_821B_0080C7CB2F86__INCLUDED_)
